<h1>Add new user</h1>
<?php 
use Zend\Form\Form;
use Zend\Form\Element;

$arr = array(
   '0' => 'supper',
   '1' => 'Admin',
   '2' => 'Visitor',   
);
$slbkSelect = new Element\Select('group_id');
$slbkSelect->setValueOptions( $arr );
$email = new Element\Email('email');
$level = new Element\Text('level');
    
$password = new Element\Password('password');
$submit = new Element\Submit('submit');
$submit->setLabel('submit')
      ->setAttributes(array(
        'class' => 'username',
        'size'  => '30',
    ));
$arrInput = array(
    array('label'=>'Email', 'input'=>$email ),
    array('label'=>'Password', 'input'=>$email ),
    array('label'=>'Group', 'input'=>$slbkSelect ),
    array('label'=>'Group', 'input'=>$level ),
);
// Within your view...
echo "<from method='post' action='' name='appForm'>";
echo $this->partialLoop('Test.php', $arrInput );
// ...render the form elements...

// Render the closing tag
echo "</form>";